﻿@model ZDSoft.LMS.Domain.User
@{
    ViewBag.Title = "Details";
    Layout = "~/Views/Shared/_Layout.cshtml";
    
    <link href="@Url.Content("~/Content/Style/ViewPage.css")" rel="stylesheet" type="text/css" />
}
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%; background-color: White;"
    align="center">
    <tr>
        <td class="mbg">
            <table cellspacing="0" cellpadding="0" width="100%" border="0" valign="top">
                <tr>
                    <td>
                        <table style="height: 23px;" cellspacing="0" cellpadding="0" width="120" background="@Url.Content("~/Content/Images/m_17.gif")"
                            border="0">
                            <tr>
                                <td>
                                    <span class="contentPageTitle">&nbsp;&gt;&gt; 详细信息</span>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td align="right" class="titleContentDivider" height="6">
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>
<p>
    @Html.ActionLink("返回列表", "Index")
    @Html.ActionLink("修改", "Edit", new { id = Model.ID })
</p>
<fieldset>
    <legend>用户详细信息</legend>
    <div class="display-label">
        用户名</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.UserName)
    </div>
    <div class="display-label">
        帐号</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Account)
    </div>
    <div class="display-label">
        状态</div>
    <div class="display-field">
        @if (Model.IsActive)
        { 
            <span>激活</span>
        }
        else
        {
            <span>不可用</span>
        }
    </div>
    <p>
        对应的角色</p>
    <table cellpadding="0" cellspacing="0" class="dataGrid" id="tbRoles">
        @if (Model.Roles == null || Model.Roles.Count == 0)
        {
            <tr>
                <td style="text-align: left; padding-left: 20px; color: Red;">
                    还未配置任何角色
                </td>
            </tr>
        }
        else
        {
            <!-- 动态生成的行开始 -->
            foreach (var item in Model.Roles)
            {
            <tr>
                <td style="text-align: left; padding-left: 20px;">
                    @item.RoleName
                </td>
            </tr>
            }
            <!-- 动态生成的行结束 -->
        }
    </table>
</fieldset>
